package com.minimalist.common.entity.lindi.po;

import com.minimalist.common.config.mybatis.InsertFullColumnHandler;
import com.minimalist.common.config.mybatis.UpdateFullColumnHandler;
import com.minimalist.common.config.mybatis.bo.BaseEntity;
import com.mybatisflex.annotation.Table;
import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 林地指标交易平台_交易申请确认函 实体类。
 *
 * @author 11987
 * @since 2025-06-06
 */
@Table(value = "LINDI_TRADE_APPLICATION_CONFIRM_LETTER", onInsert = InsertFullColumnHandler.class, onUpdate = UpdateFullColumnHandler.class)
public class LindiTradeApplicationConfirmLetter extends BaseEntity implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 交易申请确认函ID
     */
    private Long confirmLetterId;

    /**
     * 交易申请ID
     */
    private Long tradeApplicationId;

    /**
     * 确认函名称
     */
    private String confirmLetterName;

    /**
     * 确认函编号
     */
    private String confirmLetterCode;

    /**
     * 确认函类型
     */
    private String confirmLetterType;

    /**
     * 签订时间
     */
    private LocalDateTime signDate;

    /**
     * 备注
     */
    private String remark;

    /**
     * 确认函文件ID
     */
    private Long fileId;

    // 无参构造函数
    public LindiTradeApplicationConfirmLetter() {
    }

    // 全参构造函数
    public LindiTradeApplicationConfirmLetter(Long confirmLetterId, Long tradeApplicationId, String confirmLetterName, String confirmLetterCode, String confirmLetterType, LocalDateTime signDate, String remark, Long fileId) {
        this.confirmLetterId = confirmLetterId;
        this.tradeApplicationId = tradeApplicationId;
        this.confirmLetterName = confirmLetterName;
        this.confirmLetterCode = confirmLetterCode;
        this.confirmLetterType = confirmLetterType;
        this.signDate = signDate;
        this.remark = remark;
        this.fileId = fileId;
    }

    // Getter和Setter方法
    public Long getConfirmLetterId() {
        return confirmLetterId;
    }

    public void setConfirmLetterId(Long confirmLetterId) {
        this.confirmLetterId = confirmLetterId;
    }

    public Long getTradeApplicationId() {
        return tradeApplicationId;
    }

    public void setTradeApplicationId(Long tradeApplicationId) {
        this.tradeApplicationId = tradeApplicationId;
    }

    public String getConfirmLetterName() {
        return confirmLetterName;
    }

    public void setConfirmLetterName(String confirmLetterName) {
        this.confirmLetterName = confirmLetterName;
    }

    public String getConfirmLetterCode() {
        return confirmLetterCode;
    }

    public void setConfirmLetterCode(String confirmLetterCode) {
        this.confirmLetterCode = confirmLetterCode;
    }

    public String getConfirmLetterType() {
        return confirmLetterType;
    }

    public void setConfirmLetterType(String confirmLetterType) {
        this.confirmLetterType = confirmLetterType;
    }

    public LocalDateTime getSignDate() {
        return signDate;
    }

    public void setSignDate(LocalDateTime signDate) {
        this.signDate = signDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getFileId() {
        return fileId;
    }

    public void setFileId(Long fileId) {
        this.fileId = fileId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        LindiTradeApplicationConfirmLetter that = (LindiTradeApplicationConfirmLetter) o;
        return java.util.Objects.equals(confirmLetterId, that.confirmLetterId) &&
               java.util.Objects.equals(tradeApplicationId, that.tradeApplicationId) &&
               java.util.Objects.equals(confirmLetterName, that.confirmLetterName) &&
               java.util.Objects.equals(confirmLetterCode, that.confirmLetterCode) &&
               java.util.Objects.equals(confirmLetterType, that.confirmLetterType) &&
               java.util.Objects.equals(signDate, that.signDate) &&
               java.util.Objects.equals(remark, that.remark) &&
               java.util.Objects.equals(fileId, that.fileId);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(super.hashCode(), confirmLetterId, tradeApplicationId, confirmLetterName, confirmLetterCode, confirmLetterType, signDate, remark, fileId);
    }

    @Override
    public String toString() {
        return "LindiTradeApplicationConfirmLetter{" +
               "confirmLetterId=" + confirmLetterId +
               ", tradeApplicationId=" + tradeApplicationId +
               ", confirmLetterName='" + confirmLetterName + '\'' +
               ", confirmLetterCode='" + confirmLetterCode + '\'' +
               ", confirmLetterType='" + confirmLetterType + '\'' +
               ", signDate=" + signDate +
               ", remark='" + remark + '\'' +
               ", fileId=" + fileId +
               "} " + super.toString();
    }

    // Builder类
    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private Long confirmLetterId;
        private Long tradeApplicationId;
        private String confirmLetterName;
        private String confirmLetterCode;
        private String confirmLetterType;
        private LocalDateTime signDate;
        private String remark;
        private Long fileId;

        public Builder confirmLetterId(Long confirmLetterId) {
            this.confirmLetterId = confirmLetterId;
            return this;
        }

        public Builder tradeApplicationId(Long tradeApplicationId) {
            this.tradeApplicationId = tradeApplicationId;
            return this;
        }

        public Builder confirmLetterName(String confirmLetterName) {
            this.confirmLetterName = confirmLetterName;
            return this;
        }

        public Builder confirmLetterCode(String confirmLetterCode) {
            this.confirmLetterCode = confirmLetterCode;
            return this;
        }

        public Builder confirmLetterType(String confirmLetterType) {
            this.confirmLetterType = confirmLetterType;
            return this;
        }

        public Builder signDate(LocalDateTime signDate) {
            this.signDate = signDate;
            return this;
        }

        public Builder remark(String remark) {
            this.remark = remark;
            return this;
        }

        public Builder fileId(Long fileId) {
            this.fileId = fileId;
            return this;
        }

        public LindiTradeApplicationConfirmLetter build() {
            return new LindiTradeApplicationConfirmLetter(confirmLetterId, tradeApplicationId, confirmLetterName, confirmLetterCode, confirmLetterType, signDate, remark, fileId);
        }
    }

}
